10. Practice Quiz #2

QUIZ QUESTION::

Write a query that displays a table with 4 columns: actor's full name, film title, length of movie, and a column name "filmlen_groups" that classifies movies based on their length. Filmlen_groups should include 4 categories: 1 hour or less, Between 1-2 hours, Between 2-3 hours, More than 3 hours.

** Match the filmlen_groups with the movie titles in your result dataset.**

ANSWER CHOICES:



Film title

filmlen_groups

1 hour or less

Between 1-2 hours

Between 2-3 hours

SOLUTION:

Film title

filmlen_groups

1 hour or less

Between 1-2 hours

Between 2-3 hours

QUIZ QUESTION::

Now, we bring in the advanced SQL query concepts! Revise the query you wrote above to create a count of movies in each of the 4 filmlen_groups: 1 hour or less, Between 1-2 hours, Between 2-3 hours, More than 3 hours.

** Match the count of movies in each filmlen_group.**

ANSWER CHOICES:



Filmlen_groups

Count of movies in each category

2403

104

200

418

39

562

2297

439

SOLUTION:

Filmlen_groups

Count of movies in each category

104

418

39

439

Workspace

This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity, so you may be able to download them there.

Workspace Information:

  • Default file path:
  • Workspace type: sql-evaluator
  • Opened files (when workspace is loaded): n/a